package kvsnode;

import java.rmi.registry.Registry;
import java.util.Map;
import java.util.concurrent.Future;

/**
 * This is a message processor thread in the converging queue (TransferQueue).
 * 
 * @author sky
 * @version 5/9/2013
 */
public class MessageProcessorForConvergingChannel implements Runnable
{

  /**
   * The data structure in a node.
   */
  private final Object my_database;
  
  /**
   * The return object to the client.
   */
  private final Future<Object> my_future;
  
  /**
   * The registry to send message to other node.
   */
  private final Registry my_registry;
  
  /**
   * The sent message map.
   */
  private final Map<String, Future<Object>> my_sent_message_map;
  
  /**
   * Constructor.
   * 
   * @param the_sent_message_map the map to store sent message.
   * @param the_database the database each node has.
   * @param the_future the future reference for the client.
   * @param the_registry a registry to send message to other node.
   */
  public MessageProcessorForConvergingChannel(final Map<String, Future<Object>> 
  the_sent_message_map, final Object the_database, final Future<Object> the_future, 
  final Registry the_registry)
  {
    my_database = the_database;
    my_future = the_future;
    my_registry = the_registry;
    my_sent_message_map = the_sent_message_map;
  }
  
  /**
   * {@inheritDoc}
   */
  @Override
  public void run()
  {
    // TODO Auto-generated method stub
  }
  
}
